#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "OLED.h"
#include "PWM.h"
#include "encoder.h"

int main(void)
{
	OLED_Init();
	PWM_Init();
	Encoder_Init();
	
	OLED_ShowString(1, 1, "Level:");
	
	uint16_t level = Encoder_Get();
	OLED_ShowNum(1, 7, level, 4);
	
	while(1) {
		uint16_t level = Encoder_Get();
		PWM_OutPut1_level(level);
		PWM_OutPut2_level(level);
		OLED_ShowNum(1, 7, level, 4);
	}
}
